package thread;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/5/2
 * Time:10:54
 * 三个ABC打印十个ABC
 **/
public class ThreadDemo22 {
    public static void main(String[] args) {
        show();

    }

    private static void show() {
        for (int i = 0; i < 10; i++) {
            Thread t1 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.print("A");
                }
            });
            t1.run();
            Thread t2 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.print("B");
                }
            });
            t2.run();
            Thread t3 = new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.println("C");
                }
            });
            t3.run();
        }
    }
}

